WEBVTT

00:01.310 --> 00:08.840
In this video we are going to analyze our 100000 portfolios with these sharp Ray saw and we have still

00:08.840 --> 00:16.160
here our summary data frame with our six stocks and the annualized risk and return and the same we have

00:16.160 --> 00:20.580
for our 100000 portfolios.

00:20.630 --> 00:27.500
So here we have the data frame portfolio summary and actually for both data frames we can add to the

00:27.500 --> 00:36.230
column shop where we calculate actually the shop ratio which is simply the return minus the return of

00:36.410 --> 00:43.910
the risk free asset which is here one point seven percent and this is also called the risk premium.

00:43.910 --> 00:48.800
And then we divide the risk premium by the portfolio risk.

00:48.980 --> 00:57.570
So we are doing this for the summary data frame as well as for the portfolio summary data frame so let's

00:57.570 --> 01:00.720
have a look first at the summary data frame.

01:00.720 --> 01:01.910
So we on the right hand side.

01:01.920 --> 01:09.180
We have now the sharp ratio and actually the higher the sharp ratio the better the risk adjusted return

01:09.180 --> 01:10.200
or performance.

01:10.980 --> 01:16.430
So the best performance has had the Microsoft stock within Sharpe ratio of one.

01:16.590 --> 01:23.110
Then we have here Emmerson and we have IBM with a negative Sharpe ratio.

01:23.220 --> 01:29.080
So the return of the IBM stock itself was already negative minus 4 percent.

01:29.300 --> 01:37.290
And if you subtract one point seven percent from minus 4 percent then in the end it's no surprise that

01:37.290 --> 01:40.620
we get a negative Sharpe ratio.

01:40.920 --> 01:48.910
And now let's also create here the sharp column for our 100000 portfolios and let's have a look at the

01:48.910 --> 01:51.130
first five portfolios.

01:51.130 --> 01:58.710
So here we have portfolios with sharp ratios from 0 point 5 7 to 1 point 0 3.

01:59.230 --> 02:08.090
And let's also call here the informal method so we have 100000 portfolios and three columns.

02:08.090 --> 02:15.770
And let's also call here the described method and here we can see that the mean are the ever at Sharpe

02:15.770 --> 02:24.760
ratio is 0 point 8 5 and the portfolio with the lowest Sharpe ratio has a sharp ratio of minus 0 point

02:24.790 --> 02:34.350
0 1 and we have also a highest Sharpe Ratio of one point eighteen and in the next step we can also visualize

02:34.500 --> 02:43.680
this OP ratio and we actually created a scatter plot again with our 100000 portfolios and our stocks

02:43.680 --> 02:44.940
like here.

02:44.940 --> 02:52.360
So we create the same graph but we will create kind of a three dimensional graph.

02:52.500 --> 03:01.560
So the third dimension will be the sharp ratio and therefore we to see for each and every point a color

03:01.590 --> 03:05.290
that reflects the top ratio of the point.

03:05.340 --> 03:06.720
So let's do this here

03:10.570 --> 03:18.400
so we are again plotting our portfolio summary data frame with the risk on the x axis and the return

03:18.400 --> 03:23.320
on the y axis and the size of each dot or point is 20.

03:23.860 --> 03:31.090
And then we also define the color of each point or dot and the color is determined by the column sharp

03:32.210 --> 03:40.160
and we also define a color map which is a cool warm so high Sharpe Ratios will have a red color and

03:40.270 --> 03:47.060
a low Sharpe Ratios will have a blue color and we can also scale our color maps so we can say that all

03:47.060 --> 03:57.140
portfolios with a sharp ratio of four point seventy six and lower deep blue and all portfolios with

03:57.140 --> 04:00.460
a sharp ratio of one point one eight or higher.

04:00.470 --> 04:01.760
Deep Red.

04:01.760 --> 04:09.290
So setting here the optimal values for women and we mix this kind of a trial and error process and by

04:09.290 --> 04:13.040
doing so we can actually optimize our graph and optimize.

04:13.160 --> 04:17.960
The message of our graph and then we also created a color bar.

04:18.470 --> 04:25.210
And in addition we also create the points that dots for our six stocks here.

04:25.220 --> 04:29.050
So this is nothing new with a size or 50.

04:29.060 --> 04:32.950
And the black color and let's simply run here.

04:32.990 --> 04:33.410
So

04:40.700 --> 04:48.260
so here we have our shop race so and still on the x axis that we have the annualized risk in terms of

04:48.260 --> 04:53.670
standard deviation and the annualized return here on the y axis.

04:53.720 --> 05:02.720
And here we have all of our portfolios and our stocks and the color of the dots here give us the information

05:02.720 --> 05:11.270
about the shop ratio so high shop ratios are here in the dark red color and the low shop ratios are

05:11.270 --> 05:20.180
here in dark blue color and we can see here that portfolios with the highest chop ratio are in this

05:20.180 --> 05:28.320
area here so from a risk and return perspective these are the best portfolios and you will see in later

05:28.320 --> 05:35.630
videos why this is the case and we get a graphical intuition on this here but for the time being we

05:35.630 --> 05:43.460
can also include our stocks here and to the color bar and give the color corresponding to their Sharpe

05:43.480 --> 05:44.230
ratio.

05:44.930 --> 05:47.930
So this is actually quite similar in addition.

05:47.930 --> 05:56.810
So here we are defining the dots are the points for our stocks and also here we include the color perimeter

05:57.320 --> 06:00.340
and we include our stocks into the color bar.

06:00.350 --> 06:01.750
So let's have a look again here

06:08.320 --> 06:14.830
and if you can see that investing in single stocks might not reside in the best chop ratios.

06:14.830 --> 06:18.810
So here we offer the Amazon stock and some other stocks here.

06:18.820 --> 06:26.020
And I think two stocks are somewhere here and we can also see here that there might be a curve here

06:26.410 --> 06:35.320
which marks actually the optimal portfolios for a given amount of risk so having a given amount of risks

06:35.320 --> 06:42.790
for example 0.01 5 that's a portfolio that actually gives us the highest possible return.

06:42.820 --> 06:45.940
So here and having a given level of return.

06:45.940 --> 06:48.030
So for example 20 percent.

06:48.280 --> 06:55.810
That's actually one portfolio that actually realizes this return with the lowest possible risk.

06:55.840 --> 07:04.730
So this portfolio here and actually all portfolios on this curve here actually form the efficient frontier.

07:05.030 --> 07:08.310
And we can also plot here the efficient frontier.

07:08.390 --> 07:13.010
So in the background I have created the efficient frontier.

07:13.340 --> 07:21.620
So this is clearly beyond the scope of this cost because uh we use some kind of optimization algorithms

07:22.120 --> 07:24.440
but uh to show you the efficient frontier.

07:24.440 --> 07:26.480
So let's simply plot it here

07:32.100 --> 07:38.890
and here in black we can see the efficient frontier and actually at one particular portfolio on this

07:38.890 --> 07:45.120
efficient frontier is actually the portfolio with the highest Sharpe Ratio man in the next video.

07:45.120 --> 07:48.650
We will identify the maximum shop raised for portfolio.

07:49.080 --> 07:50.970
So I hope to see you there by.
